DescriptionInterceptors allow you to define code to be executed before and/or after the execution of an action. Interceptors can be a powerful tool when writing web applications. Some of the most common implementations of an Interceptor might be:
Intercepters must first be defined (to give name them) and can be chained together as a stack: <interceptors> <interceptor name="security" class="com.mycompany.security.SecurityInterceptor"/> <interceptor-stack name="defaultComponentStack"> <interceptor-ref name="component"/> <interceptor-ref name="defaultStack"/> </interceptor-stack> </interceptors> To use them in your actions: <action name="VelocityCounter" class="com.opensymphony.webwork.example.counter.SimpleCounter"> <result name="success">...</result> <interceptor-ref name="defaultComponentStack"/> </action> NOTE: Reference name can be either the name of the interceptor or the name of a stack For more details, see Interceptors reference. Most of the content here provided by Matt Dowell <[email protected]> |